What is Event Driven Architecture (EDA)?
-
Software development approach in which services (operations) of the software are triggered by events
Event? User takes an action in the application, a state change happens and a event is generated. Examples:
1. User fills form click submit, event is generated
2. You click the subscribe button on a YouTube channel. Subscription event is generated.
3. Write Email, Click Send button. Send event generated
Components of EDA (Loosely coupled)
-
1. Event
2. Event Producer: Send event to handler/broker
3. Router / Broker: Recieves incoming event and send event to appropriate subscribers.
4. Event Consumer: Broker sends event to consumer
Benefits of EDA
-
1. Scalability: Scale up/down of consumer, producer easily
2. Interoperability: Go application can send events to Rust or Kotlin application.
3. asynchronous: Producer sends the event to broker, Now producer is not blocked for response.